//
//  HCPatientModel.m
//  QuickCure1
//
//  Created by Oopsjesse on 01/11/2016.
//  Copyright © 2016 maoge. All rights reserved.
//

#import "HCPatientModel.h"

@implementation HCPatientModel

    -(void)setValue:(id)value forUndefinedKey:(NSString *)key{}


//归档  告诉系统,该对象有哪些属性需要存储
-(void)encodeWithCoder:(NSCoder *)aCoder
{
    [aCoder encodeObject:self.name forKey:@"lbl_illnessName"];
    
    [aCoder encodeObject:self.number forKey:@"lbl_illnessNum"];
    
    [aCoder encodeObject:self.telNum forKey:@"lbl_illnessTelNum"];
    
    [aCoder encodeObject:self.diseasTypy forKey:@"lbl_illnessType"];
    
    [aCoder encodeObject:self.diseasDetail forKey:@"lbl_illnessDetails"];
    
    [aCoder encodeObject:self.diseasDescription forKey:@"text_illnessDes"];
    
    [aCoder encodeObject:self.imagePatient forKey:@"img_illnessImg"];
    
    [aCoder encodeObject:self.illnessHistoryCurrentTime forKey:@"lbl_illness_currentTime"];
    
    
}

//解档   告诉系统,该对象有哪些属性可以取
-(nullable instancetype)initWithCoder:(NSCoder *)aDecoder
{
    if ([super init]) {
        self.name = [aDecoder decodeObjectForKey:@"lbl_illnessName"];
        
        self.number = [aDecoder decodeObjectForKey:@"lbl_illnessNum"];
        
        self.telNum = [aDecoder decodeObjectForKey:@"lbl_illnessTelNum"];
        
        self.diseasTypy = [aDecoder decodeObjectForKey:@"lbl_illnessType"];
        
        self.diseasDetail = [aDecoder decodeObjectForKey:@"lbl_illnessDetails"];
        
        self.diseasDescription = [aDecoder decodeObjectForKey:@"text_illnessDes"];
        
        self.imagePatient = [aDecoder decodeObjectForKey:@"img_illnessImg"];
        
        self.illnessHistoryCurrentTime = [aDecoder decodeObjectForKey:@"lbl_illness_currentTime"];
        
    }
    return self;
}

    
@end
